package trinidad;

import java.util.ArrayList;

/**
 * Poprawiona ArrayLista
 */
public class ArrayListFX extends ArrayList {
	public static final long serialVersionUID = 384334;
	
	public Move[] toMoveArray() {
		Move[] obj = new Move[this.size()];
		for (int i = 0; i < this.size(); i++) {
			obj[i] = (Move) this.get(i);
		}
		return obj;
	}
	
	public static ArrayListFX fromMoveArray(Move[] arr) {
		ArrayListFX alfx = new ArrayListFX();
		for (int a = 0; a < arr.length; a++)
			alfx.add(arr[a]);
		return alfx;
	}
	
	public GameStateX[] toGSXArray() {
		GameStateX[] obj = new GameStateX[this.size()];
		for (int i = 0; i < this.size(); i++) {
			obj[i] = (GameStateX) this.get(i);
		}
		return obj;
	}
}
